home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ian & Stuart's Australian Mac: Not for Sale
/
Another.not.for.sale (Australia).iso
/
fade into you
/
getting there
/
Apps
/
MOO-1.7.6.src
/
inc
/
server.h
< prev
next >
Wrap
Text File
|
1994-11-02
|
3KB
|
95 lines
/******************************************************************************
Copyright (c) 1992 Xerox Corporation. All rights reserved.
Portions of this code were written by Stephen White, aka ghond.
Use and copying of this software and preparation of derivative works based
upon this software are permitted. Any distribution of this software or
derivative works must comply with all applicable United States export
control laws. This software is made available AS IS, and Xerox Corporation
makes no warranty about the software, its performance or its conformity to
any specification. Any person obtaining a copy of this software is requested
to send their name and post office or electronic mail address to:
Pavel Curtis
Xerox PARC
3333 Coyote Hill Rd.
Palo Alto, CA 94304
Pavel@Xerox.Com
*****************************************************************************/
/* server.h */
/*
* This describes the complete set of procedures that a network implementation
* is expected to use from the rest of the server. See 'network.h' for the
* complete set of procedures that a network implementation must provide.
*/
#ifndef Server_H
#define Server_H 1
#include "config.h"
#include "network.h"
typedef struct {
void *ptr;
} server_handle;
extern server_handle server_new_connection(network_handle h, int outbound);
/* Called by the network whenever a new
* player connection is made. By this call,
* the network and server exchange tokens
* representing the connection for use in
* later calls on each other. If `outbound' is
* true, then the connection is being made from
* the server to some external place.
*/
extern void server_receive_line(server_handle h, const char *line);
/* The given line has been received as input
* on the specified connection. 'line' does
* not end in a newline; any such bytes have
* been removed by the network. The characters
* in 'line' are all either spaces or non-
* whitespace ASCII characters.
*/
extern void server_close(server_handle h);
/* The specified connection has been broken
* for some reason not in the server's control.
* Effective immediately, the network will no
* longer use the given server_handle and the
* server should not use the corresponding
* network_handle.
*/
#endif /* Server_H */
/*
* The following procedures should not be called by a network implementation;
* they are exported from the server module to other parts of the program.
*/
#include "structures.h"
enum Fork_Result { FORK_PARENT, FORK_CHILD, FORK_ERROR };
extern enum Fork_Result fork_server(const char *subtask_name);
extern void player_connected(Objid old_id, Objid new_id,
int is_newly_created);
extern void notify(Objid player, const char *message);
extern void boot_player(Objid player);
/* $Log: server.h,v $
* Revision 1.4 1992/10/23 23:03:47 pavel
* Added copyright notice.
*
* Revision 1.3 1992/10/21 03:02:35 pavel
* Converted to use new automatic configuration system.
*
* Revision 1.2 1992/09/08 22:05:35 pjames
* Removed procedures which are no longer exported.
*
* Revision 1.1 1992/07/20 23:23:12 pavel
* Initial RCS-controlled version.
*/